package com.glsc.ngateway.common.api.flowable.dto.task;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class FlowFormSyncBaseEntityDto {

    @ApiModelProperty(name = "唯一编号")
    private String processId;

    @ApiModelProperty(name = "流程名称")
    private String processTitle;

    @ApiModelProperty(name = "申请日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate processCreateTime;

    @ApiModelProperty(name = "发起人账户")
    private String flowCreateOperatorAccount;

    @ApiModelProperty(name = "申请人部门")
    private Integer flowCreatorDepartment;

    @ApiModelProperty(name = "申请人公司")
    private Integer flowCreatorCompany;

    @ApiModelProperty(name = "审批要素")
    private String approvalElements;

    @ApiModelProperty(name = "审批人")
    private String approver;

    @ApiModelProperty(name = "流程类型")
    private String processType;

    @ApiModelProperty(name = "任务id")
    private String taskId;
}
